package com.cyj.demo.controller;

import com.cyj.demo.service.IDemoService;
import com.cyj.edu.mvcframework.annotations.LagouAutowired;
import com.cyj.edu.mvcframework.annotations.LagouController;
import com.cyj.edu.mvcframework.annotations.LagouRequestMapping;
import com.cyj.edu.mvcframework.annotations.LagouSecurity;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@LagouController
@LagouRequestMapping("/mvc/demo")
@LagouSecurity ("lisi")
public class DemoController {

    @LagouAutowired
    private IDemoService demoService;

    @LagouRequestMapping("/query")
    @LagouSecurity ({"lisi","zhangsan"})
    public String query(HttpServletRequest request, HttpServletResponse response,String name){


      return demoService.get(name);
    }

}
